Developer --> Technical Publications
PATHHardware Documentation > USB Devices > Mac OS USB DDK API Reference


USBGetPipeStatusByReference

The USBGetPipeStatusByReference function returns status on a specified pipe or the device's default pipe 0.

OSStatus USBGetPipeStatusByReference (
                     USBReference ref,
                     USBPipeState *state);

--> ref
Pipe reference.
<-- state
Returns the pipe state, it can be one of these constants:
kUSBActive   Pipe can accept new transactions
kUSBIdle      Pipe cannot accept new transactions
kUSBStalled  An error occurred on the pipe

Errors returned by the USBGetPipeStatusByReference function include:

kUSBUnknownPipeErr
-6997 pipe reference specified is unknown

In version 1.0 of the USB Services software the USBGetPipeStatusByReference function does not operate as defined above. If the pipe is not active, it returns an error and the state is not set. The USBGetPipeStatusByReference function does work as defined in version 1.0.1 and later of the USB Services software. If noErr is returned, the state is returned correctly. If this call returns an error, the error should be examined to see what state the pipe is in.

Errors returned by the USBGetPipeStateByReference function include:

noErr
0 specified pipe is active
kUSBPipeIdleErr
-6980 specified pipe is in the idle state
kUSBPipeStalledErr
-6979 specified pipe is stalled

© 1999 Apple Computer, Inc.

Previous | Back Up One Level | Next | Show Frames | Hide Frames